import { EntitySchema } from '@mikro-orm/core';

export class ImsYzdKpDistributeGradeLog {
  id!: number;
  disId?: number;
  type?: boolean;
  data?: number;
  oldGrade?: unknown;
  newGrade?: unknown;
  time?: string;
  uniacid?: number;
}

export const ImsYzdKpDistributeGradeLogSchema = new EntitySchema({
  class: ImsYzdKpDistributeGradeLog,
  properties: {
    id: { primary: true, type: 'number' },
    disId: { type: 'number', nullable: true, index: 'dis_id' },
    type: { type: 'boolean', nullable: true, index: 'type' },
    data: { type: 'number', nullable: true },
    oldGrade: { type: 'unknown', columnType: 'longtext', nullable: true },
    newGrade: { type: 'unknown', columnType: 'longtext', nullable: true },
    time: { type: 'string', length: 255, nullable: true },
    uniacid: { type: 'number', nullable: true, index: 'uniacid' },
  },
});
